//---------------------------------------------------------------------------
#ifndef CImpressionBoutonH
#define CImpressionBoutonH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Printers.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include "CtrlStd.h"
#include "CSpeedBtn.h"
//---------------------------------------------------------------------------
class PACKAGE_CTRLSTD CImpressionBouton : public TCustomControl
{
public:
  typedef void __fastcall (__closure *FctImpressionAAppeler)(TObject* Sender,TPrinterOrientation pOrientation);
private:
  CSpeedButton *btnImage;
  TSpeedButton *btnFleche;
  TPopupMenu   *menuPopup;
  TMenuItem* itemPortrait, *itemPaysage;
  bool        _impression;
  FctImpressionAAppeler _onChoixOrientationEffectue;
  void __fastcall PortraitExecute(TObject *Sender);
  void __fastcall PaysageExecute(TObject *Sender);
  void __fastcall btnFlecheClick(TObject *Sender);
  void __fastcall SetImpression(bool pValeur);
  void __fastcall SetTypeImpression();
protected:

public:
  __fastcall CImpressionBouton(TComponent* Owner);
  __fastcall ~CImpressionBouton();
__published:
  __property bool Impression = {read = _impression, write = SetImpression, default = true};
  __property FctImpressionAAppeler OnChoixOrientationEffectue = {read = _onChoixOrientationEffectue, write = _onChoixOrientationEffectue};
};
//---------------------------------------------------------------------------
#endif